package com.ruoyi.AI.service;

import org.apache.ibatis.mapping.Environment;
import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.context.EnvironmentAware;
import org.springframework.http.client.reactive.ReactorClientHttpConnector;
import org.springframework.stereotype.Component;
import org.springframework.web.reactive.function.client.WebClient;
import reactor.netty.http.client.HttpClient;
import reactor.netty.transport.ProxyProvider;

@Component
public class ApiCodeLoadAware implements ApplicationContextAware {


    @Override
    public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {

        ConstValuePool.PROXY_OPENAI_CLIENT = WebClient.builder()
                .baseUrl("")
//                .defaultHeader("Authorization", "Bearer pat_aBDN3fbG7tWxkYiJrRlhVvFE1CjSFP7xC57tOwTGexaup7Naggm8prbMHUN76NiW" )
                .build();

    }
}